/*
 * @Author: lihaogn
 * @Date: 2021-12-18 20:56:13
 * @LastEditTime: 2022-05-28 10:04:31
 * @LastEditor: lihaogn
 * @Description: 用户模型种子文件
 *   创建种子文件命令：npx sequelize-cli seed:generate --name seeder-permissions
 *   运行种子文件命令：npx sequelize-cli db:seed --seed 03-seeder-permissions
 * @FilePath: \lix-admin-server\database\seeders\03-seeder-permissions.js
 */
"use strict";

module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
     */

    return queryInterface.bulkInsert(
      "permissions",
      [
        {
          id: "000",
          name: "系统管理",
          mark: "system-manage",
          type: 1,
          description: "可以访问系统管理菜单",
          created_at: new Date(),
          updated_at: new Date(),
        },
      ],
      {}
    );
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */

    return queryInterface.bulkDelete("permissions", null, {});
  },
};
